package com.example.pojo;

import lombok.Data;

@Data
public class Result {
   private int code;
   private String msg;
   private Object data;
    private Result() {
    }
    private Result(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static Result succeed(){
        return new Result(1,"succeed",null);
    }public static Result succeed(Object data){
        return new Result(1,"succeed",data);
    }public static Result error(String msg){
        return new Result(0,msg,null);
    }

}
